<?php echo $header; ?>
<?php if ($error_warning) { ?>
<div class="warning"><?php echo $error_warning; ?></div>
<?php } ?>
<div class="box">
  <div class="left"></div>
  <div class="right"></div>
  <div class="heading">
    <h1 style="background-image: url('view/image/template.png');"><?php echo $heading_title; ?></h1>
    <div class="buttons"><a onclick="$('#form').submit();" class="button"><span><?php echo $button_save; ?></span></a><a onclick="location = '<?php echo $cancel; ?>';" class="button"><span><?php echo $button_cancel; ?></span></a></div>
  </div>
  <div class="content">
    <form action="<?php echo $action; ?>" method="post" enctype="multipart/form-data" id="form">
      <table class="form">
        <tr>
          <td><span class="required">*</span><?php echo $entry_code; ?></td>
          <td>            
            <input type="hidden" name="simple_template" value="1" />
            
            <input type="text" id="code" name="code" value="<?php echo $code; ?>" size="100" />
            <?php if (isset($error_code)) { ?>
              <span class="error"><?php echo $error_code; ?></span>
            <?php } ?></td>
          </td>
        </tr>
        <tr>
          <td><span class="required">*</span><?php echo $entry_title; ?></td>
          <td>
            <input type="text" id="title" name="title" value="<?php echo $title; ?>" size="100" />
            <?php if (isset($error_title)) { ?>
              <span class="error"><?php echo $error_title; ?></span>
            <?php } ?></td>
          </td>
        </tr>
        <tr>
          <td><span class="required">*</span><?php echo $entry_description; ?></td>
          <td>
            <textarea id="description" name="description"><?php echo $description; ?></textarea>
            <?php if (isset($error_description)) { ?>
              <span class="error"><?php echo $error_description; ?></span>
            <?php } ?>
            
            <input type="hidden" name="product_title" value="" />
            <input type="hidden" name="footer_text" value="" />
            <input type="hidden" name="product_limit_text" value="0" />
            <input type="hidden" name="product_limit" value="0" />
            <input type="hidden" name="product_limit" value="0" />
            <input type="hidden" name="template_layout" value="simple" />            
          </td>
        </tr> 
        <tr>
          <td><?php echo $entry_status; ?></td>
          <td>
              <select name="status">
                <?php if($status){ ?>
                  <option value="1" selected="selected"><?php echo $text_enabled; ?></option>
                  <option value="0"><?php echo $text_disabled; ?></option>
                <?php } else { ?>
                  <option value="1"><?php echo $text_enabled; ?></option>
                  <option value="0" selected="selected"><?php echo $text_disabled; ?></option>
                <?php } ?>
              </select>
          </td>
        </tr>  
      </table>
    </form>
  </div>
</div>
<script type="text/javascript" src="view/javascript/ckeditor/ckeditor.js"></script>
<script type="text/javascript"><!--
  CKEDITOR.replace('description', {
      filebrowserBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
      filebrowserImageBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
      filebrowserFlashBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
      filebrowserUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
      filebrowserImageUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
      filebrowserFlashUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>'
  });
//--></script>

<?php echo $footer; ?>